/******************************************************************************/
package jamie.org.sil.www.UsxConfigEditor;

import java.util.ArrayList;


/******************************************************************************/
/**
 * All information which is specific to the vernacularParms file.  (A concrete
 * realisation of XmlDetails.)
 * <p>
 *
 * Note that the order in which tags are added to the data structures here
 * determines the order in which they will be written out to the XML file.
*/

public class XmlDetailsOutputDisposition extends XmlDetails
{
  /****************************************************************************/
  /****************************************************************************/
  /**                                                                        **/
  /**                               Public                                   **/
  /**                                                                        **/
  /****************************************************************************/
  /****************************************************************************/


  /****************************************************************************/
  /** Constructor.
   *
   * @throws RuntimeException
   */

  public XmlDetailsOutputDisposition () throws RuntimeException
  {
    String[] tabNames = getTabNames();
    for (int i = 0; i < tabNames.length; ++i)
      m_PerTabTagTable.put(i, new ArrayList<ConfigTag.Generic>(100));

    doTags();
  }


  /****************************************************************************/
  /** Gets the default file name to be offered to the user when writing data.
   *
   * @return Default file name.
   */

  public String getDefaultFileName ()
  {
    return "OutputDisposition.xml";
  }


  /****************************************************************************/
  /** Returns the root tag to be used when writing the output file.
   *
   * @return Root tag.
   */

  public String getRootTag ()
  {
    return "outputDisposition";
  }


  /****************************************************************************/
  /** Gets the names to be applied to the tabs on the tabbed pane.
   *
   * @return names
   */

  final public String[] getTabNames ()
  {
    String s[] = {"Output disposition"};
    return s;
  }






  /****************************************************************************/
  /****************************************************************************/
  /**                                                                        **/
  /**                               Private                                  **/
  /**                                                                        **/
  /****************************************************************************/
  /****************************************************************************/

  /****************************************************************************/
  /* Add details of miscellaneous tags. */

  private void doTags () throws RuntimeException
  {
    setTabNo("Output disposition");

    addTag(new ConfigTag.List("outputOverallDisposition",
                              "Overall disposition",
                              "Should all the outputs be combined into a single file?",
                              "MultipleFiles",
                              ConfigTag.Optionality.C_Mandatory,
                              "MultipleFiles|Combined"));

    addTag(new ConfigTag.List("outputScriptureTextDisposition",
                              "Scripture text disposition",
                              "Should scripture text be combined, should there be one file per book, etc?",
                              "PerBook",
                              ConfigTag.Optionality.C_Mandatory,
                              "Combined|PerBook|PerChapter"));

    addTag(new ConfigTag.List("outputFootnotesDisposition",
                              "Footnotes disposition",
                              "Should footnotes be removed, should they go in the scripture files, etc?",
                              "AtEndOfTextFile",
                              ConfigTag.Optionality.C_Mandatory,
                              "None|AtEndOfTextFile|InSituInTextFile|PerTextFile|Combined"));

    addTag(new ConfigTag.List("outputEndnotesDisposition",
                              "Endnotes disposition",
                              "Should endnotes be removed, should they go in the scripture files, etc?",
                              "WithFootnotes",
                              ConfigTag.Optionality.C_Mandatory,
                              "None|WithFootnotes|AtEndOfTextFile|InSituInTextFile|PerTextFile|Combined"));

    addTag(new ConfigTag.List("outputCrossReferencesDisposition",
                              "Cross-referemces disposition",
                              "Should cross-references be removed, should they go in the scripture files, etc?",
                              "WithFootnotes",
                              ConfigTag.Optionality.C_Mandatory,
                              "WithFootnotes|WithEndnotes|None|AtEndOfTextFile|InSituInTextFile|PerTextFile|Combined"));

    addTag(new ConfigTag.List("outputIntroductionDisposition",
                              "Disposition of introductory material",
                              "Where should introductory material go?",
                              "InSituInTextFile",
                              ConfigTag.Optionality.C_Mandatory,
                              "WithFootnotes|WithEndnotes|None|AtEndOfTextFile|InSituInTextFile|PerTextFile|Combined"));
  }
}
